Repository navigation
feat(store): open SQLite Stores Normal and default PostgreSQL to local - #732
Merged
Merged
Conversation
…l (layerfs-project#155 §7) Owner direction 2026-11-17: enable the Normal mode on both backends now, ahead of its safety and performance gate; troubleshooting follows. SQLite - New profile SqlitePersistenceProfile::Normal: WAL, synchronous=1 (NORMAL), fullfsync=0, wal_autocheckpoint=0, identity sqlite-wal-normal-v2. - Every product opener selects it: the daemon (install and owner), the Store service (install and SDK open), project add and discovery, Store identity, compact, SQLite transfer and backup restore. - The session's checkpoint thread opened its connection at synchronous=0. It now takes the session's value and reads it back; under NORMAL a pass at 0 would mark log frames copied that never reached the disk. - The Init, live-add and install gates accept Normal or Disposable and still refuse Durable. Disposable stays selectable, so existing tests that select it keep running at synchronous=OFF. PostgreSQL - synchronous_commit defaults to local (it was off): SynchronousCommit's default, PostgresSelection::new, store.connect and the open arguments. A Store connected earlier keeps its recorded value; a recorded "off" is still honoured. Not in this change (known gaps, #155 §7) - The safety proof (§7.5) and the performance gate (§7.6) have not run. No power-loss guarantee is claimed. - Store files written outside SQLite are still not synchronized (§7.3): install, transfer, restore, snapshot and home records. - The manifest wire byte (2) and the record label ("disposable") are unchanged; store.get still reports profile "disposable". - No PostgreSQL server prerequisite check (fsync, full_page_writes). - PersistenceConfig::sqlite still defaults to Durable. Tests - background_checkpoint.rs: the same long-log case now also runs under Normal and asserts the read-back profile (synchronous=1). - open_args.rs: the default setting is "local". - No test deleted. Docs: root and engine AGENTS.md persistence-profile rule, the SQLite architecture page, the PostgreSQL default in the Store pages and the SDK skill reference. Production LOC: 187380 -> 187394 (delta +14) Scope and method: tools/production_loc.py at this commit, first parent 9203d99 against the committed tree; core 40408 -> 40408, engine 89372 -> 89386, control 51073 -> 51073, api 6527 -> 6527; reference absent (retired R9c; last counted 65,417 at tree 498dd19). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Owner direction 2026-11-17: enable the Normal mode on SQLite and PostgreSQL now, merge, and troubleshoot afterwards. This is the minimum of layerfs-project#155 §7 stage N1 that makes Normal the mode in use.
SQLite
SqlitePersistenceProfile::Normal: WAL,synchronous=1(NORMAL),fullfsync=0,wal_autocheckpoint=0.synchronous=0. It now takes the session's value and reads it back. Under NORMAL a pass at 0 would mark log frames copied that never reached the disk.PostgreSQL
synchronous_commitdefaults tolocal(it wasoff): the persistence default,store.connectand the open arguments. A Store connected earlier keeps its recorded value.Not in this change
store.getstill reportsprofile: "disposable".fsync,full_page_writes).PersistenceConfig::sqlitestill defaults to Durable.Checks (macOS host, Rust 1.85.1, one run each, every command under 120 s)
cargo check --workspace --all-targets,cargo fmt --check, Clippy-D warningson the seven changed crates, product boundary guard: pass.layerfs-persistence(the five profile, checkpoint and publication files only), and all test files oflayerfs-project,layerfs-store-service(79),layerfs-bridge,layerfs-daemon,layerfs-store,layerfs-bucket,layerfs-api(75),layerfs-cli(25) andlayerfs-control(43 of 44).layerfs-controlobserved_control::observed_facade_borrows_scope_with_same_two_pointer_layout(size_of::<WorkspaceApi>()is 64, expected 16). This change touches no file inlayerfs-controlorlayerfs-sandbox; I did not run it on the base.layerfs-persistencesuite.Production LOC: 187380 -> 187394 (delta +14); engine 89372 -> 89386, core, control and api unchanged. Counter:
tools/production_loc.py, first parent9203d99db0against the committed tree.🤖 Generated with Claude Code